/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package functionroots.samples;

import functionroots.primitives.RealFunction;

/**
 *
 * @author orion
 */
public class Function12 implements RealFunction{

    public double value(double x) {
        return Math.sqrt(x) + x - (Math.exp(-x) + Math.log(x) + 2);
    }

    public double derivative(double x) {
        return 1/(2*Math.sqrt(x)) + 1 + Math.exp(-x) - 1/x;
    }

    public String text(double x) {
        return "sqrt(" + x + ") + " + x + " - (1/exp(" + x + ") + log(" + x + ") +2)";
    }
}